#ifndef STEP_H
#define STEP_H

#include <QString>


// 1注射器 2阀门 3转盘 4盖盖 5检测器


class Step{
public:
    Step();
    double  time = 0;
    int     type = 0;
    int     idx = 0;

    virtual QString stepPrinter() = 0;
};

class StepReset : public Step{
public:
    StepReset();
    QString stepPrinter() override;
};

class StepSyringe : public Step{
public:
    StepSyringe(int idx, int direct, double speed, double posi, double acturalSpeed = -100);
    QString stepPrinter() override;
    double speed = 1;       // 百分比速度
    int direct = 1;     // -1: 推  1: 拉
    double posi = 0;    //
    double actualSpeed = 1;     // 用来显示的速度，单位是ml/s
};

class StepValve : public Step{
public:
    StepValve(int idx, bool state);
    QString stepPrinter() override;
    bool state;          // 开/关
};


class StepWheel : public Step{
public:
    StepWheel(int posi, int direct, int speed);
    QString stepPrinter() override;
    int posi;         // 要转到的位置1~9
    int direct;         // 方向 1/-1
    int speed;          // 速度
};

class StepHat : public Step{
public:
    StepHat();
    QString stepPrinter() override;
};

class StepDetector : public Step{
public:
    StepDetector(bool state);
    bool state;
    QString stepPrinter() override;
};


#endif // STEP_H
